﻿using Mvc3SignalR.Aspects;
using Mvc3SignalR.Models;

namespace KnockoutSignalR.Sample.Models
{
    public class TestModel : KnockoutHub
    {
        private static string _someTextProperty = "hello world";
        private static string _nonStaticString = "foo bar";

        [KnockoutAspect, Observable]
        public string SomeTextProperty
        {
            get { return _someTextProperty; }
            set { _someTextProperty = value; }
        }

        [KnockoutAspect, Observable]
        public string NonStaticString
        {
            get { return _nonStaticString; }
            set { _nonStaticString = value; }
        }

        [ClientFunction]
        public void UpperCaseName()
        {
            SomeTextProperty = SomeTextProperty.ToUpperInvariant();
        }

    }
}